﻿<h5 class="ui header">Resources</h5>
<div class="ui divider"></div>
<div>
    <table class="ui small table segment">
        <thead>
            <tr>
                <th>
                    Name
                </th>
                <th>
                    Description
                </th>
                <th>
                </th>
                <th>
                </th>
            </tr>
        </thead>
        <tbody>
            <tr></tr>
            <tr>
                <td class="danger" colspan="4" data-ng-show="resources.length == 0">
                    There are no resources
                </td>
            </tr>
            <tr data-ng-repeat="resource in resources">
                <td>
                    <a href="/Resources/{{resource.Id}}">{{resource.Name}}</a>
                </td>
                <td>
                    {{resource.Description}}
                </td>
                <td style="width: 4%;">
                    <a href="/Resources/Edit/{{resource.Id}}"><i class="edit icon"></i></a>
                </td>
                <td style="width: 4%;">
                    <i class="trash icon" style="float: right;" title="Delete {{resource.Name}}" message="Do you want to remove this item?"
                       modal-id="{{resource.Id}}" on-approve="deleteResource(resource.Id);"
                       on-deny="closeModal();" cst-confirm-modal></i>
                </td>
            </tr>
        </tbody>
    </table>
    <div style="float: right;">
        <a class="ui mini blue button" href="/Resources/Add">Create new</a>
    </div>
</div>

